package com.github.bitsapling.sapling.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import jakarta.persistence.OneToMany;
import jakarta.persistence.PrimaryKeyJoinColumn;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 用户分组表
 * </p>
 *
 */
@TableName("user_group")
public class UserGroup implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键ID，唯一标识每个用户分组
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 分组唯一标识符（URL友好名称），用于前端展示和API调用
     */
    private String slug;

    /**
     * 分组显示名称（如"普通用户"、"VIP用户"等）
     */
    private String displayName;

    /**
     * 关联的推广策略ID，外键关联到promotion_policies表
     */
    private Long promotionPolicyId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSlug() {
        return slug;
    }

    public void setSlug(String slug) {
        this.slug = slug;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public Long getPromotionPolicyId() {
        return promotionPolicyId;
    }

    public void setPromotionPolicyId(Long promotionPolicyId) {
        this.promotionPolicyId = promotionPolicyId;
    }

    @Override
    public String toString() {
        return "UserGroup{" +
        "id = " + id +
        ", slug = " + slug +
        ", displayName = " + displayName +
        ", promotionPolicyId = " + promotionPolicyId +
        "}";
    }
}
